#include<bits/stdc++.h>
using namespace std;
const int MOD = 1e9+7;
int solve() {
  int n,x; cin>>n>>x;
  int coins[n];
  //vector<int>coins(n);
  for(int i=0; i<n; ++i) { cin>>coins[i]; }
  vector<int>dp(x+1,0);
  dp[0]=1;
  for(int i=0; i<x; ++i) {
    if(dp[i]==0) continue;
    for(int j=0;j<n;++j) {
      int val=coins[j];
      if(i+val<=x)(dp[i+val]+=dp[i])%=MOD; // MOD it HERE to avoid an overflow.
    }
  }
  cout << dp[x] << endl;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  // freopen("in.txt","r",stdin);
  // freopen("out.txt","w",stdout);
  int tc; tc = 1;
  for(int t = 1; t <= tc; t++) {
    // cout << "Case #" << t << ": "
    solve();
  }
  return 0;
}
